Docker workflow#1105
Conversation
changes: - created docker build and push workflow - created ubuntu 24.04 docker image - modified reuseable_fast and basic to work on docker image - modified pr/push to run build image when needed - added few installation to docker files
d1700d4 to
527baa9
Compare
| ARG TEST_DEPS="\ | ||
| libnuma-dev" | ||
| libnuma-dev \ | ||
| libhwloc-dev \ |
There was a problem hiding this comment.
libhwloc and libtbb are already included in UMF_DEPS - in all Dockerfiles
There was a problem hiding this comment.
you have right, I will remove it
There was a problem hiding this comment.
heh, nope - you should not remove the UMF_DEPS. These ARGs are not only to list all dependencies, this is also to show which ones are required for using the library, and which are required e.g. for testing.
I believe tbb is not required to compile UMF, but it's required for tests. hwloc is required for UMF, so could be removed from test deps.
Okay that's said - there's another issue that's connected.
libhwloc-dev should be installed only on newer Ubuntu, here on Ubuntu-20.04 we should not install it and only install it via our script.
So in this OS, pls move HWLOC_DEPS up, add no UMF_DEPS, but please make a comment that hwloc is required as UMF dependency.
On other OSes, please remove the hwloc script and HWLOC_DEPS, and use UMF_DEPS equal to libhwloc-dev.
| contents: read | ||
|
|
||
| jobs: | ||
| build-ci-container: |
There was a problem hiding this comment.
I think this job shall be limited to upstream only:
if: github.repository == 'oneapi-src/unified-memory-framework'
There was a problem hiding this comment.
I'm not sure for that. As we were talking, I left it untouched
There was a problem hiding this comment.
could you try and add that, pls? I think it should work just fine; at least we should test it.
Of course as long as you're testing you can omit adding it 😉
| image: ${{ matrix.image }} | ||
| options: --user root --privileged | ||
| volumes: | ||
| - /home/runner/work/unified-memory-framework/unified-memory-framework:/home/runner/work/unified-memory-framework/unified-memory-framework |
There was a problem hiding this comment.
Can ${{github.workspace}} be used in case it differs?
| ${{matrix.extra_build_options}} | ||
|
|
||
| - name: Build | ||
| run: cmake --build ${{env.BUILD_DIR}} --config Release -j |
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: windows-latest |
There was a problem hiding this comment.
Remove this var as there is only one OS tested
| @@ -91,6 +134,7 @@ jobs: | |||
| -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" | |||
There was a problem hiding this comment.
CMAKE_INSTALL_PREFIX not used, remove
There was a problem hiding this comment.
I also left it because it wouldn't work without it https://github.com/rbanka1/unified-memory-framework/actions/runs/13549985319/job/37871871137
| ARG TEST_DEPS="\ | ||
| libnuma-dev" | ||
| libnuma-dev \ | ||
| libhwloc-dev \ |
There was a problem hiding this comment.
heh, nope - you should not remove the UMF_DEPS. These ARGs are not only to list all dependencies, this is also to show which ones are required for using the library, and which are required e.g. for testing.
I believe tbb is not required to compile UMF, but it's required for tests. hwloc is required for UMF, so could be removed from test deps.
Okay that's said - there's another issue that's connected.
libhwloc-dev should be installed only on newer Ubuntu, here on Ubuntu-20.04 we should not install it and only install it via our script.
So in this OS, pls move HWLOC_DEPS up, add no UMF_DEPS, but please make a comment that hwloc is required as UMF dependency.
On other OSes, please remove the hwloc script and HWLOC_DEPS, and use UMF_DEPS equal to libhwloc-dev.
| ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
| run: | | ||
| echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | ||
| BuildDockers: |
There was a problem hiding this comment.
pls verify if detectChanges works properly when we merge a PR - pls test scenarios when you merged PR with and without any docker changes
There was a problem hiding this comment.
There was a problem hiding this comment.
hmm tbh I'm not sure what has been tested here...? these were not a "test PRs" being merged into main, right? I was thinking - you push your new workflow (with building docker) into your main, then open 2 PRs on your fork and see if they are working properly (on PR). Later, test if after merging they are still working properly.
// for testing purpose I feel like you have to use different actor and set token in secrets
| ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | ||
| run: | | ||
| echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}" | ||
| BuildDockers: |
There was a problem hiding this comment.
hmm tbh I'm not sure what has been tested here...? these were not a "test PRs" being merged into main, right? I was thinking - you push your new workflow (with building docker) into your main, then open 2 PRs on your fork and see if they are working properly (on PR). Later, test if after merging they are still working properly.
// for testing purpose I feel like you have to use different actor and set token in secrets
| run: sudo apt-get install -y ${{matrix.compiler.cxx}} | ||
|
|
||
| - name: Install libhwloc | ||
| run: .github/scripts/install_hwloc.sh |
There was a problem hiding this comment.
this step shouldn't be here - it's already covered in docker
| LD_LIBRARY_PATH="${{env.BUILD_DIR}}/lib/:${LD_LIBRARY_PATH}" ctest --output-on-failure | ||
|
|
||
| - name: Check coverage | ||
| - name: Check os coverage |
There was a problem hiding this comment.
why this change in name?
| working-directory: ${{env.BUILD_DIR}} | ||
| run: | | ||
| export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.os}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}} | ||
| export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-${{matrix.ubuntu_ver}}-shared-${{matrix.shared_library}}-no_hwloc-${{matrix.disable_hwloc}} |
There was a problem hiding this comment.
ok, that's not good - the name of the artifact will be cov-22.04-shared... - we should definitely keep the old name with "ubuntu" in it - as we may have more OSes than just ubuntu - perhaps you should use the var as before os instead of ubuntu_ver -- so basically turn back what it was in matrix - os: ['ubuntu-20.04', 'ubuntu-22.04']
For unity, the same approach in FastBuilds - os: ['ubuntu-20.04', 'ubuntu-22.04'] instead of ubuntu_ver: <number>
| ARG UMF_DEPS="\ | ||
| libhwloc-dev \ | ||
| libtbb-dev" | ||
| # libhwloc-dev is required |
There was a problem hiding this comment.
this comment should be a little more verbose - saying that it's installed here via script, as the hwloc version is too old on this OS
and please move HWLOC_DEPS and # Copy hwloc here, above.
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
There was a problem hiding this comment.
still missing tbb removal for matrix.install_tbb == 'OFF'
|
continued in #1298 |
Add Docker workflow
changes:
Checklist